package everyday;

public class T1015 {
    public int smallestRepunitDivByK(int k) {
        if (k % 2 == 0 || k % 5 == 0) return -1;
        int p = 1 % k;
        int i = 1;
        while (p != 0) {
            p = (p * 10 + 1) % k;
            i++;
        }
        return i;
    }
}
